package com.wn;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author yellow Docter
 * @date 2024-07-08
 * @desc 蜗牛创想：www.woniuxy.com
 */
public class AA {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        List<String> tokens = new ArrayList<>();
        // 正则表达式，用于匹配数字或运算符
        Pattern pattern = Pattern.compile("(\\d+|[+\\-*])");
        Matcher matcher = pattern.matcher(str);

        while (matcher.find()) {
            // 将匹配到的每一项添加到列表中
            tokens.add(matcher.group());
        }
        // 打印列表内容
        System.out.println("tokens = " + tokens);

    }

}
